package oo;

public class TestStudentCourse {
    public static void main(String[] args) {
        // 1. 创建课程对象
        Course c1 = new Course("C001", "Java程序设计", "教学楼A301", "周一上午1-2节", "T001");
        Course c2 = new Course("C002", "数据库原理", "实验楼B205", "周三下午3-4节", "T002");

        // 2. 创建教师对象并调用开课方法
        Teacher t1 = new Teacher("T001", "张三", "男", c1);
        Teacher t2 = new Teacher("T002", "李四", "女", c2);
        t1.openCourse();
        t2.openCourse();

        // 3. 创建学生对象并模拟选课、退课、打印课表
        Student s1 = new Student("S001", "王五", "男");
        Student s2 = new Student("S002", "赵六", "女");

        s1.selectCourse(c1);
        s2.selectCourse(c2);
        s1.printSchedule();
        s2.printSchedule();

        s1.dropCourse();
        s1.printSchedule();
    }
}